﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace PIT.Labs.ProjectRepository.Owl2DotNet.Rdf.Classes
{
    /// <summary>
    /// Specilized OWL class representing a class restriction
    /// </summary>
    public class RdfClassRestriction : RdfClass
    {
        /// <summary>
        /// 
        /// </summary>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings")]
        public string ParentClassUri { get; private set; }

        /// <summary>
        /// 
        /// </summary>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings")]
        public string PropertyUri { get; private set; }

        internal RdfClassRestriction(string property, string parentClass, int id, XElement node, RdfOntology o)
            : base(o)
        {
            this.Label = "RESTRICTION_" + id;
            this.Uri = new Uri(o.Uri + "#" + this.Label);
            this.Node = node;
            this.ParentClassUri = parentClass;
            this.PropertyUri = property;
            // do not insert! Will be inserted by factory method!!
            //o.Insert(this);
        }
    }
}
